# from pyecharts.charts import Line
# line = Line()
# x_data = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
# y_data = [820, 932, 901, 934, 1290, 1330, 1320]
# line.add_xaxis(x_data)
# line.add_yaxis("降雨量", y_data)
# import pyecharts.options as opts
# line.set_global_opts(
#     # 控制标题
#     title_opts=opts.TitleOpts(title="折线图示例标题", subtitle="我是副标题", pos_left="center", pos_top="top"),
#     # 控制图例
#     legend_opts=opts.LegendOpts(is_show=True, pos_left="left", pos_top="bottom"),
#     # 工具箱
#     toolbox_opts=opts.ToolboxOpts(is_show=True),
#     # 视觉映射
#     visualmap_opts=opts.VisualMapOpts(is_show=True, min_=0, max_=2000)
# )
# line.render()



from pyecharts.charts import Map
import pyecharts.options as opts
map=Map()
data=[
    ("北京市",1000),
    ("上海市",2000),
    ("广东省",3000),
    ("广西壮族自治区",4000),
    ("四川省",5000),
    ("陕西省",6000),
    ("浙江省",7000),
    ("福建省",8000),
    ("安徽省",9000)
]
map.add("",data,maptype="河南")
map.set_global_opts(
    visualmap_opts=opts.VisualMapOpts(is_piecewise=True, pieces=[
        {"min": 1000, "max": 2000, "label": "1000-2000"},
        {"min": 3000, "max": 4000, "label": "3000-4000"},
        {"min": 5000, "max": 6000, "label": "5000-6000"},
        {"min": 8000, "max": 9000, "label": "8000-9000"}
    ])
)
map.render()